package com.yangchao.ch05

class example3 {
    public static void main(String[] args) {
        //nodeBuilder ：创建node对象的嵌套以处理任意数据
        nodeBuilder()

    }

    static def nodeBuilder() {
        def builder = new NodeBuilder()


        def wList = builder.workerlist {
            worker(id: '100', name: 'Mike', project: 'flow')
            worker(id: '101', name: 'John', project: 'market')
        }
        println wList
    }
}
